Dumping Japanese Text
If you are trying to translate a large game with a lot of text
in it (or maybe your poor translators don't want to search the
ROM for text...) then this may help speed things up. The idea
is to dump all the game text to a file ready for translation.
You will need to of worked out how and where the text is stored
first, natch.
Before your read through this, you should know that I am giving
you a cut-down version of my text dumper for Dragon Quest 6.
This should make it much easier to write your own (just modify mine!)
Download Example Text Dumper
Step 1: Make sure you can view Japanese
This is a bit obvious, but maybe you don't have the software to
do it (yet). I use NJWin v1.5 (NJStar's CJK
Multilingual Support System!). Get it from
The NJStar Web Page.
Don't worry, it's free/shareware. When you get it, install it and
come back to this page. The following text is in EUC-JIS format.
When you view this page with NJWin running in Japanese EUC-JIS mode,
the text should appear as in the image below it:
おこのみの ひょうじそくどは?
|
|
Step 2: Dump the text as tile numbers
This is not necessary yet, but I thought breaking down the
programming may help you. Here is some pseudo-code for what
your program should do (you should already know where in the
ROM the text data is stored):
for i=*text data start position* to *text data end position*
j=ROM[i]
if j=*string end byte*
printf("String end\n")
else
printf("%02x",j)
endif
next i
This is very basic, it will need adapting to your langauge
and you need to load in the ROM and stuff. Btw, You should
make it print useful info, like the position in the ROM that
each string starts at (needed when you insert new text!).
|
Step 3: Figure out the EUC-JIS text format
Ok, if you bothered with Step 2, you should have a program that
dumps all your text data to a file. Now you just need to modify
it to print the Japanese characters instead of a load of numbers.
This Step is not really anthing, just some information I found out.
I don't know much about EUC-JIS, but it seems to use 2 characters/bytes
for each Japanese character. Most Japanese word processors use it,
not just NJStar products. Anyway, I found that any byte higher than
0xA1 followed by another byte higher than 0xA1 seems to get converted
to Japanese or Chinese character with EUC-JIS. Hmm...
|
Step 4: Convert the game font to EUC-JIS
We need to tell our program what Japanese character is represented
by which number, so it can print these instead. To do this, make
a text file containing the font in EUC-JIS format. For example, for
Dragon Quest 6, here is the 8x8 font and the EUC-JIS text version
I made for it:
00 0123456789HMPGあいうえおかきくけこさしすせそた
ちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんっゃ
ゅょアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホ
マミムメモヤユヨラリルレロワヲンッャュョァィェォ一?!▼>>→。.
「…/????:ExLv―*??.ABCDEFGHIJKLMNOPQRST
UVWXYZ??????★E ┏━┃┠─┃b1b2b3b4b5b6〜+__????bcbdbebf
c0c1c2c3c4c5c6c7c8がぎぐげござじずぜぞだぢづでどばびぶべぼヴガギ
グゲゴザジズゼゾダヂヅデドバビブベボぱぴぷぺぽパピプペポ〜+feff
I left all the characters I could not find in EUC-JIS as '??'.
Also, I put all the seemingly unused characters to their tile
numbers in hexadecimal. However, I later found that some of the
unused numbers were used for 'special' characters (like the ones
with quotes in the top-right corner. Before you make a start on this,
you need some existing EUC-JIS text to grab characters from (unless
you have a Japanese keyboard?!). Save this page and cut-and-paste
characters from the EUC-JIS text above. Incase you need more
characters, here is the Mana2 font in EUC-JIS format (special thanks
to SoM2Freak, he did most of this font :) ). This font has a LOT of
characters, you should find every Japanese character you need here:
!”“▼%‘’()*+,―./0123456789:「」=○?
●ABCDEFGHIJKLMNOPQRSTUVWXYZ×…時月日
〜abcdefghijklmnopqrstuvwxyz、。ー★あ
いうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむ
めもやゆよらりるれろわをんっゃゅょぁぃぅぇぉッャュョァィゥェォア
イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミム
メモヤユヨラリルレロワヲンがぎぐげござじずぜぞだぢづでどばびぶべ
ぼガギグゲゴザジズゼゾダヂヅデドバビブベボヴぱぴぷぺぽパピプペポ
『王人魔様獣行女私光法 国見聖力司祭都剣間子兵出神攻手風大城敵師
方英入雄中町界導何母地火使者聞精思死達世前待男夜気言事変紅知回今
生目士』近撃霊蓮窟船洞道会金域最上下戦備武命屋器呪滝父来港市心像
復明装盗薬悪水用理一開喰術仲話賊竜旅強自守杖不押森村動闇原団名軍
宿召侵身代内分急殺斬石定殿必領・衣喚古始性全誰伝土本以黄後黒込塞
山持失場親先通々炎外館騎空体脱防木与立裂高樹商消真早草部落休教橋
穴邪主勝信説占選槍弟天宝亡戻化供銀血再残止所旋着瞳能秘陛返影花我
顔兄決結交口助同白氷品封要牢狼→安暗囲運牙換技泣業具形元呼湖御根
砂作首周少雪走属他谷帝投毒姫夢雷裏流印音家幻庫寝跡設倉的闘突飛壁
帽娘滅油由【】愛羽奥海各革帰玉建枯向考実若種新声争続追度逃波彼表
負物砲北味面友輪遺危許胸禁減現合昨治終住盾初書星西昔単頂東当頭忍
熱売妃百文望妹密眠無傭妖乱冷烈連[]異仮加可解街岳寒感岩機脚仇去
漁極恵拳犬好孔頃在姿糸次取小数青赤切想増息足対帯隊長直底鉄南難配
発抜半避閉放霧迷野了零←↓違井右雨遠怪巻関岸期吸宮巨苦君系賢戸護
航降字示室灼弱受集十常情飾色進針陣勢成相送憎族打退短段値昼朝調怒
倒塔読謎反皮病貧舞噴平別辺未勇利率両涙↑阿位意液荷害格覚完官汗希
美貴公探良耀起乗島魂幽念眼活超伯爵堕救共果断忘年効困存予然仕多二
植絶態悲惑恐険捨静幼引収途畑翼廊客庭得敗買泊役和広造匹有路育改却
逆深吹遅珍令永過階継刻支状食板礼老係験重証干潜側孫暖箱粉墓欲緑恋
員学記義凶経欠悟幸左災散産修正醒素太笛店透背媒爆歩末矢林例弓語更
荒罪耳祝将晶象賞触寸線創低転統伏門練労移円恩温灰境狂件権玄虎枝誌
射朱週純処除昇衝雀制善僧巣弾点凍破馬杯髪胞枚民綿毛猛羅燕塩乙画冠
球刑絹候功香彩疾蛇従匠床浄図銭閃但鳥刀浜夕曜葉陽嵐里侶臨
|
Step 5: Adapt your code to use the EUC-JIS data
If you did Step 2 and already have some wokring code, this step
will be less painful. Basically, you just add some code to load the
text file you made in Step 4 and replace the code that prints
the character number to print the relevant Japanese character
from the EUC text file. Remember that each EUC-JIS character takes
2 bytes, so you will probably have something like:
if j=*string end byte*
print "String end"
else
k=EUCfile[(j*2)]
print asc(k)
k=EUCfile[(j*2)+1]
print asc(k)
endif
|
|